import request from '@/api/request'

export function get_auth_code(params) {

  const res = request({
    url: '/wechat/auth_code',
    method: 'get',
    params,
  })

  return res
}

export function get_auth_openid(params) {

  const res = request({
    url: '/wechat/auth_openid',
    method: 'get',
    params,
  })

  return res
}

export function get_jsapi_sign(url) {

  const res = request({
    url: '/wechat/jsapi_sign',
    method: 'get',
    params: { url: url },
  })

  return res
}

// 显示二维码
export function show_qrcode_with_logo(url) {
  const res = request({
    url: '/wechat/api/qrcodelogo',
    method: 'GET',
    responseType: 'arraybuffer',
    params: { url: url }
  })
  return res
}